<?PHP


// -------------------------------------------------------------------------------------------------------
function BuildJoueursTable () {
        global $prefix, $SmiliesURL;

        if ($resultat = mysql_query( "SELECT identifiant,nom, prenom FROM rugby_joueurs Where identifiant!='' Order by prenom " )){
                $Showed = 0;
                while ($row = mysql_fetch_array($resultat)) {
                        if ($Showed == 12) {
                                echo "</tr><tr>";
                                $Showed = 0;
                        }

                                echo "<td><img border=0 src=\"../images/joueurs/".$row["identifiant"].".jpg\" alt='".$row["prenom"]." ".$row["nom"]."' onclick='insertJoueurs()' width=50) height=50></td>";

                                $Showed += 1;

                }
        }
}

// -------------------------------------------------------------------------------------------------------
function ShowJoueursDialog () {
        echo "<html id=dlgImage STYLE=\"width: 600px; height: 300px;\">";
        echo "<head>";
        echo "<style> html,body,textarea { font-family: verdana,arial; font-size: 5pt; };</style>";
        echo "<title>"._LEQUIPE."</title>";

        AddJoueursScript();
        AddCancelScript();

        echo "</head>";
        echo "<body topmargin=0 leftmargin=0 style='background: threedface; color: windowtext;' scroll=no>";
        echo "<table class=dlg cellpadding=0 cellspacing=2 width=100% height=100% >";
        echo "<tr><td>";
        echo  "<table border=0 align=center cellpadding=2>";
        echo  "<tr>";
        BuildJoueursTable();
    echo  "</tr>";
    echo  "</table>";
    echo "</td></tr>";
    echo "<tr><td align=center>";
    echo "<input type=button value="._BTNCLOSE." onclick=window.close()></td></tr>";
    echo "</table>";
    echo "</html>";
}

?>
